﻿// ----------------------------------------------------------------------
//
// <copyright file="Next_IMVU_Ver.cs" company="TheAcidToy Inc" Date="2012">
//     TheAcidToy is a registered trademark of TheAcidToy Inc. All right reserved, copywrited: 2012
// </copyright>
//
// ------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HtmlAgilityPack;
/// <summary>
/// Returns the IMVU web version
/// </summary>
class Next_IMVU_Ver
{

    public static string level;
    public static string get_Ver()
    {
        try
        {
            var web = new HtmlWeb();
            var doc = web.Load("http://www.imvu.com/download.php");

            foreach (var ver in doc.DocumentNode.SelectNodes("//div[@class=\"yui-xu first\"]//ul//li[@style=\"list-style-type: square; margin-left: 20px; margin-top: 10px;\"]//b"))
            {
                  return ver.InnerHtml.Split(':')[0];
            }
            return level = "";
        }
        catch (Exception ex)
        {
            ex.ToString();
            return "";
        }
    }
}
